
public class DuckSimulator {
	public static void main(String[] args){
		DuckSimulator sim = new DuckSimulator();
		sim.simulate();
	}
	
	void simulate(){
		Quackable mallardDuck = new QuackCounter(new MallardDuck());
		Quackable redHeadDuck = new QuackCounter(new RedHeadDuck());
		Quackable duckCall= new QuackCounter(new DuckCall());
		Quackable rubberDuck = new QuackCounter(new RubberDuck());
		
		Quackable gooseDuck = new GooseAdaptor(new Goose());
		
		System.out.println("\nDuck Sim #3 How may time Quacks?");
		
		simulate(mallardDuck);
		simulate(redHeadDuck);
		simulate(duckCall);
		simulate(rubberDuck);
		simulate(gooseDuck);
		
		System.out.println("\nThs Ducks Quacked " + QuackCounter.getQuacks() + " Times");
	}
	
	void simulate( Quackable duck){
		duck.Quack();
	}
	

}
